<?php
#Template for Member Login
$page = (isset($page)) ? $page : 'register';
include "inc/local_data.php";
$form = (isset($using_real_env) && $using_real_env) ? $form : ((isset($data[$page])) ? $data[$page] : array());
if (empty($form)) exit;

?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <title><?php echo $form['title'];?></title>
		<?php include('inc/embed_top.php');?>
    </head>
    <body mlang="<?php echo $form['lang'];?>" class="body-gray">
        <div id="reg" class="<?php echo $form['lang'];?> reg" data-role="page" data-theme="f">
            <div class="ltit"><span class="logo">&nbsp;</span><span class="r">tvb.com</span></div>
            <form id="regForm" method="<?php echo $form['method'];?>" ajax="<?php echo $form['ajax_url'];?>" success_url="<?php echo $form['success_url'];?>" action="<?php echo $form['action'];?>" target="_top" autocomplete="off">
            	<h1><?php echo $form['register_title'];?></h1>
                <?php
                    foreach((array)$form['hidden'] as $key=>$val) {
                        echo '<input type="hidden" name="'.$key.'" value="'.$val.'" id="'.$key.'" />';
                    }
                ?>
    			<div id="err-msg"></div>
                <div class="field">
                	<label for="s-email"><?php echo $form['email']['title'];?><em><?php echo $form['email']['note'];?></em></label>
                	<input type="text" name="email" id="s-email" data-theme="f" value="" />
                </div>
                <div class="field">
                	<label for="s-password"><?php echo $form['password']['title'];?><em><?php echo $form['password']['note'];?></em></label>
                	<input type="password" name="password" id="s-password" data-theme="f" value="" />
                </div>
                <div class="field">
                	<label for="s-repassword"><?php echo $form['repassword']['title'];?></label>
                	<input type="password" name="repassword" id="s-repassword" data-theme="f" value="" />
                </div>
                <div class="field chkcode">
                	<label for="s-chkcode"><?php echo $form['captcha']['title'];?><em><?php echo $form['captcha']['note'];?></em></label>
                	<input type="text" name="captcha" id="s-chkcode" data-theme="f" value="" />
                </div>
                <div class="captcha field">
                	<img id="captcha-img" width="200" height="50" alt="" src="./image.php?r=<?php echo $microtime;?>" />
                	<a href="javascript:void(0);" rel="external" id="reload-captcha-img">&nbsp;</a>
                </div>
                <div class="field ui-ubtn nobs"><input type="submit" value="<?php echo $form['button']['register']['value'];?>" data-role="button" data-theme="f" /></div>
    		</form>
        </div>
		<?php include('inc/embed_bottom.php');?>
    </body>
</html>
